<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>概况</title>
    <link rel="stylesheet" href="https://www.layuicdn.com/layui-v2.5.6/css/layui.css" media="all">
    <style>
        .situation-container {
            padding: 60px;
        }

        .situation-container div h1{
            font-weight: bold;
            display: inline-block;
        }
        .content {
            display: flex;
            justify-content: space-between;
        }
        .situation-container div ul {
            margin: 100px 0;
            display: flex;
            justify-content: space-around;
            flex: 1;
        }
        .situation-container div ul li {
            text-align: center;
        }
        .situation-container div ul li p {
            font-size: 24px;
            font-weight: bold;
            margin-bottom: 10px;
        }
        .situation-container div ul li div{
            color: #666;
            font-size: 16px;
        }
    </style>
</head>

<body>
    <div class="situation-container">
        <div>
            <h1>实时统计</h1>
            <!-- <span>统计时间：2019-10-08 11:43:52</span> -->
        </div>

        <div class="content">
            <ul>
                <li>
                    <p id="goodsPayOrderNum">0</p>
                    <div>商品付款订单</div>
                </li>
                <li>
                    <p id="goodsPayOrderPrice">0</p>
                    <div>付款金额（元）</div>
                </li>
            </ul>

            <ul>
                <li>
                    <p id="distributionPayOrderNum">0</p>
                    <div>分销商付款订单</div>
                </li>
                <li>
                    <p id="distributionPayOrderPrice">0</p>
                    <div>付款金额（元）</div>
                </li>
            </ul>
        </div>

        <div>
            <h1>待办事项</h1>
            <ul style="justify-content: flex-start;">
                <li style="margin-left: 125px;">
                    <p id="pendingOrdersNum">0</p>
                    <div>待处理订单</div>
                </li>
                <!-- <li>
                    <p id="goodsPrice">0</p>
                    <div>商品订单营收</div>
                </li>
                <li>
                    <p id="distributionPrice">0</p>
                    <div>分销订单营收</div>
                </li>
                <li>
                    <p id="revenuePrice">0</p>
                    <div>店铺总营收</div>
                </li> -->
            </ul>
        </div>
    </div>

</body>


<!-- 操作 -->
<script type="text/html" id="barDemo">
    <a class="layui-btn layui-btn-xs" lay-event="lookDetails">发短信</a>
</script>
<script src="https://www.layuicdn.com/layui-v2.5.6/layui.js"></script>
<script src="../utils.js"></script>
<script>

    layui.use(['jquery', "layer"], function () {
        var layer = layui.layer,
            $ = layui.jquery;


            ajax({
                path: "/stat/getStatInfo",
                type:'get',
                success: function (res) {
                    console.log(res);
                    for (const key in res) {
                        if (res.hasOwnProperty(key)) {
                            const el = res[key];
                            $("#" + key).html(el);
                        }
                    }
                }
            }, $)
    });
</script>

</html>